Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8378: Fixed handling non-indexable field types #250

Merged

Conversation

vidarl
Copy link
Member

@vidarl vidarl commented Jun 10, 2024

🎫 Issue IBX-8378

When making a custom field type, it must implement Indexable (even though the field content should not be searchable) or else the solr bundle will return exception:

OutOfBoundsException:
Field Type "mycustomfieldtype" is not indexable. Provide Ibexa\Contracts\Core\FieldType\Indexable implementation and register it with the "ibexa.field_type.indexable" tag.
 
  at vendor/ibexa/core/src/lib/Search/Common/FieldRegistry.php:39
  at Ibexa\Core\Search\Common\FieldRegistry->getType('ezuser')
     (vendor/ibexa/solr/src/lib/FieldMapper/ContentTranslationFieldMapper/BlockDocumentsContentFields.php:79)

Legacy search and Elastic search will not throw any errors.

It is a bit unclear to me if it is intended that all fieldtypes must implement Indexable or not.
pro:

cons:

  • Documentation doesn't say it is required unless you want data be searchable
  • All other search engine adapters (legacy search and elastic) doesn't require it.

So either documentation should be updated or Solr bundle should behave as the other search engine adapters. This PR adds support in Solr for not having to implement Indexable

Copy link

sonarcloud bot commented Jun 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vidarl vidarl requested a review from a team June 11, 2024 10:25
@alongosz alongosz requested a review from adamwojs June 11, 2024 13:26
@alongosz alongosz requested a review from a team June 11, 2024 13:33
@alongosz alongosz requested a review from a team June 12, 2024 12:25
@alongosz alongosz changed the title IBX-8378: Fieldtype must implement Indexable if using Solr IBX-8378: Fixed handling non-indexable field types Jun 12, 2024
Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on IbexaDXP 3.3 commerce.

@alongosz alongosz merged commit 19ff229 into 3.3 Jul 9, 2024
23 checks passed
@alongosz alongosz deleted the IBX-8378_Fieldtype_must_implement_Indexable_if_using_Solr branch July 10, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants